﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Business;

namespace ServicesDirectory.UserControl
{
    public partial class OrganisationDetail3 : System.Web.UI.UserControl
    {
        public int EoiProgrammes;
        public int EoiService;
        public void GetData()
        {
            EoiProgrammes = int.Parse(cklProgrammes.SelectedValue);
            EoiService = int.Parse(cklServices.SelectedValue);
        }
        public void LoadData()
        {

        }


        protected void Page_Load(object sender, EventArgs e)
        {
            BindEoiProgrammes();
            BindEoiServices();
        }

        #region load reference data

        private void BindEoiProgrammes()
        {
            cklProgrammes.DataSource = OrganizationBusiness.Instance.GetEoiProgrammes();
            cklProgrammes.DataValueField = "RefValue";
            cklProgrammes.DataTextField = "DataRef";
            cklProgrammes.DataBind();
        }

        private void BindEoiServices()
        {
            cklServices.DataSource = OrganizationBusiness.Instance.GetEoiServices();
            cklServices.DataTextField = "DataRef";
            cklServices.DataValueField = "RefValue";
            cklServices.DataBind();
        }
        #endregion
    }
}